package com.wdb007.venus.svc.facade.model;

import java.io.Serializable;

import com.wdb007.venus.svc.facade.constant.RspCodeEnum;

public class VenusSvcResp<T> implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5875681255002368447L;

	/**
	 * rspCode: 响应码.
	 */
	private int rspCode;

	/**
	 * rspMsg: 响应描述.
	 */
	private String rspMsg;

	
	private RspCodeEnum rspCodeEnum ;
	/**
	 * body: 消息体.
	 */
	private T body;

	public VenusSvcResp() {

	}

	public VenusSvcResp(RspCodeEnum rspCodeEnum) {
		this.rspCodeEnum = rspCodeEnum ;
		this.rspCode = rspCodeEnum.getRspCode();
		this.rspMsg = rspCodeEnum.getRspMsg();
	}
	
	public VenusSvcResp(int rspCode, String rspMsg) {
		this.rspCode = rspCode;
		this.rspMsg = rspMsg;
	}

	public VenusSvcResp(int rspCode, String rspMsg, T body) {
		this.rspCode = rspCode;
		this.rspMsg = rspMsg;
		this.body = body;
	}

	public int getRspCode() {
		return rspCode;
	}

	public void setRspCode(int rspCode) {
		this.rspCode = rspCode;
	}

	public String getRspMsg() {
		return rspMsg;
	}

	public void setRspMsg(String rspMsg) {
		this.rspMsg = rspMsg;
	}

	public T getBody() {
		return body;
	}

	public void setBody(T body) {
		this.body = body;
	}
	
	public RspCodeEnum getRspCodeEnum() {
		return this.rspCodeEnum ;
	}
	
	public void setRspCodeEnum(RspCodeEnum rspCodeEnum) {
		this.rspCodeEnum = rspCodeEnum;
		this.rspCode = rspCodeEnum.getRspCode();
		this.rspMsg = rspCodeEnum.getRspMsg();
	}
}
